<ion-header-bar class="bar-stable " align-title="center">
  <button class="button button-icon icon ion-ios-arrow-thin-left" ng-click="$ionicGoBack()"></button>
  <div class="h1 title">注册</div>
</ion-header-bar>

<ion-content class="padding">
  <form class="list list-inset" name="Form">
    <label class="item item-input" style="margin-bottom: 10px;">
      <input type="text" placeholder="请输用户名" ng-model="vm.name"
             validator="required,maxlength=30,minlength=2" required-error-message="用户名不能为空">
    </label>
    <label class="item item-input" style="margin-bottom: 10px;">
      <input type="text" placeholder="请输入手机号" ng-model="vm.phone"
             validator="required,number,maxlength=11,minlength=11">
    </label>
    <div class="row row-no-padding" style="margin-bottom: 10px;">
      <label class="item item-input col-50" style="margin-right: 10px;">
        <input type="text" placeholder="请输入验证码" ng-model="vm.smsCode"
               validator="required,number,maxlength=6,minlength=6" style="padding-right: 6px;">
      </label>
      <div class="col">
        <button class="button button-block button-calm" style="margin: 0;">获取验证码</button>
      </div>
    </div>

    <label class="item item-input">
      <input type="password" placeholder="请输入密码" ng-model="vm.initialPassword"
             validator="required,maxlength=16,minlength=6">
    </label>
  </form>
  <div class="assertive text-center" ng-show="errorMessage">{{errorMessage}}</div>
  <div class="balanced text-center" ng-show="successMessage">{{successMessage}}</div>
  <button class="button button-block button-calm" progress-button="requestAddMember(vm)" ng-disabled="!checkValid(Form)">注册</button>

</ion-content>
